<?php
class RelationWidget extends Widget
{
    public function render($data)
    {
        if (S('relationList')) {
            $relationList	=	S('relationList');
        } else {
            $relationList = D("Activity")->top10();
            S('relationList', $relationList);
        }

        $data['list'] = $relationList;
        $content = $this->renderFile('relation',$data);
        return $content;

    }
}
